import axios from 'axios';
import Request from '@/utils/request';

export class materialGroupApi {

  static findPage(params) {
    return Request.getAndLoadData('/business/admin/materialGroup/findPage', params);
  }

  static findList(params) {
    return Request.getAndLoadData('/business/admin/materialGroup/findList', params);
  }

  static findDetail(parameter) {
    return axios({
      url: '/business/admin/materialGroup/findDetail',
      method: 'get',
      params: parameter
    });
  }

  static add(params) {
    return Request.post('/business/admin/materialGroup/add', params);
  }

  static edit(params) {
    return Request.post('/business/admin/materialGroup/edit', params);
  }

  static del(params) {
    return Request.post('/business/admin/materialGroup/delete', params);
  }

}
